package com.travel.admin.enums;
/**
 * @desc:  日志等级 枚举
 */
public enum LogLevelEnum {

    WARN("warn","warn级别"),
    INFO("info","info级别"),
    ERROR("error","error级别"),
    DEBUG("debug","debug级别"),


    ;


    private String level;
    private String des;

    LogLevelEnum(String level, String des){
        this.level = level;
        this.des = des;
    }

    public LogLevelEnum findByLevel(String level){
        for(LogLevelEnum logLevelEnum : LogLevelEnum.values()){
            if(level.equals(logLevelEnum.getLevel())){
                return logLevelEnum;
            }
        }
        return null;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }
}
